# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Donald Carr <sirspudd@gmail.com>
# Contributor: Jake Petroules <jake.petroules@qt.io>
pkgname=qbs
pkgver=1.9.0
pkgrel=1
pkgdesc='Cross platform build tool'
arch=('x86_64' 'i686')
url='https://code.qt.io/qt-labs/qbs.git'
license=('LGPL')
depends=('qt5-base' 'qt5-script')
makedepends=('gcc')
source=($pkgname-$pkgver.tar.gz::"https://github.com/qt-labs/qbs/archive/v$pkgver.tar.gz")
sha512sums=('7cd8635cab0d4341486c9491ee2e2ef8c86bde46768b52a2432a7c2097bd739a870f20bd04f93b3c89bbc15eb108ed5dc50fcb3a9a476f2d10ec73d2ae6d5f20')

build() {
  cd qbs-$pkgver
  qmake QBS_INSTALL_PREFIX=/usr \
    QBS_LIBEXEC_INSTALL_DIR=/usr/lib/qbs \
    QBS_RELATIVE_LIBEXEC_PATH=../lib/qbs \
    CONFIG+=qbs_enable_project_file_updates \
    qbs.pro
  make
}

package() {
  cd qbs-$pkgver
  INSTALL_ROOT="$pkgdir" make install
}
